<template>
    <div id="OrdersPickDetail_detail">
        <v-details :detailData="inputData" :inputConfig="inputConfig"></v-details>
    </div>
</template>

<script>
    import details from 'commons/Detail'
    import baseMixin from "@/mixins/BaseMixin";

    export default {
        name: "OrdersPickDetail_detail",
        mixins: [baseMixin],
        data() {
            return {
                inputConfig: [
                    [
                        {
                            type: "input",
                            label: this.$t('out.orderkey'),
                            props: "orderkey",
                        },
                        {
                            type: "input",
                            label: this.$t('outbound.userlinenumber'),
                            props: "orderlinenumber",
                        },
                        {
                            type: "input",
                            label: this.$t('config.sku'),
                            props: "sku",
                        },
                        {
                            type: "select",
                            label: this.$t('common.status'),
                            props: "status",
                            options: this.getOptions("querycodeLkup/ORDRSTATUS")
                        },
                        {
                            type: "input",
                            label: this.$t('out.statusrequired'),
                            props: "statusrequired",
                        },
                        {
                            type: "input",
                            label: this.$t('out.assignmentnumber'),
                            props: "assignmentnumber",
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: this.$t('config.shipper'),
                            props: "storerkey",
                        },
                        {
                            type: "input",
                            label: this.$t('config.loc'),
                            props: "loc",
                        },
                        {
                            type: "input",
                            label: this.$t('out.batchcartonid'),
                            props: "batchcartonid",
                        },
                        {
                            type: "date",
                            label: this.$t('out.effectivedate'),
                            props: "effectivedate",
                        },
                        {
                            type: "input",
                            label: this.$t('out.equipmenttype'),
                            props: "equipmenttype",
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: this.$t('config.packaging'),
                            props: "packkey",
                        },
                        {
                            type: "input",
                            label: this.$t('config.measureUnit'),
                            props: "uom",
                        },
                        {
                            type: "input",
                            label: this.$t('config.num'),
                            props: "qty",
                        },
                        {
                            type: "input",
                            label: this.$t('out.uomqty'),
                            props: "uomqty",
                        },
                        {
                            type: "input",
                            label: this.$t('config.gross'),
                            props: "grosswgt",
                        },
                        {
                            type: "input",
                            label: this.$t('out.equipmentid'),
                            props: "equipmentid",
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: this.$t('out.pickdetailkey'),
                            props: "pickdetailkey",
                        },
                        {
                            type: "input",
                            label: this.$t('in.lpn'),
                            props: "id",
                        },
                        {
                            type: "input",
                            label: this.$t('out.lot'),
                            props: "lot",
                        },
                        {
                            type: "input",
                            label: this.$t('config.toLoc'),
                            props: "toloc",
                        },
                        {
                            type: "input",
                            label: this.$t('config.suttle'),
                            props: "netwgt",
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: this.$t('in.asnCode'),
                            props: "receiptkey",
                        },
                        {
                            type: "select",
                            label: this.$t('in.qcstatus'),
                            props: "qcstatus",
                            options: this.getOptions("querycodeLkup/QCSTATUS")
                        },
                        {
                            type: "select",
                            label: this.$t('out.isclosed'),
                            props: "isclosed",
                            options: this.getOptions("querycodeLkup/ISCLOSE")
                        },
                        {
                            type: "input",
                            label: this.$t('config.tareWeight'),
                            props: "tarewgt",
                        },
                        {
                            type: "input",
                            label: this.$t('out.trackingid'),
                            props: "trackingid",
                        },
                    ]
                ],
                inputData: {}
            }
        },
        methods: {
            async getInputData() {
                try {
                    let res = await this.$api.get(`/queryPickdetailBypickdetailkey/${this.$store.state.routeData.orderkey}/${this.$parent.temporary.pickdetailkey}`)
                    
                        this.inputData = res.bean;
                    
                } catch (e) {
                    this.$message.error(e);
                }
            }
        },
        mounted() {
            this.getInputData();
        },
        components: {
            'v-details': details
        }
    }
</script>

<style scoped>

</style>

